package com.refusea.remoting.baidu.io

import com.alibaba.fastjson2.annotation.JSONField

// https://ai.baidu.com/ai-doc/ANTIPORN/Nk3h6xbb2, https://ai.baidu.com/ai-doc/ANTIPORN/Vk42xcpu1
data class BaiduCensorResult(
    @JSONField(name = "log_id")
    val logId: Long,

    // error_code	Long	N	错误提示码，失败才返回，成功不返回
    @JSONField(name = "error_code")
    val errorCode: Int?,
    @JSONField(name = "error_msg")
    val errorMsg: String?,

    // conclusionType 1.合规，2.不合规，3.疑似，4.审核失败
    @JSONField(name = "conclusionType")
    val conclusionType: Int?,
) {
    fun legal(): Boolean {
        return conclusionType == 1
    }
}
